import request from '@/utils/request'

// 查询环境数据预测列表
export function listPrediction(query) {
  return request({
    url: '/system/prediction/list',
    method: 'get',
    params: query
  })
}

// 查询环境数据预测详细
export function getPrediction(predictionId) {
  return request({
    url: '/system/prediction/' + predictionId,
    method: 'get'
  })
}

// 删除环境数据预测
export function delPrediction(predictionId) {
  return request({
    url: '/system/prediction/' + predictionId,
    method: 'delete'
  })
}

// 生成空气质量预测数据
export function generateAirQualityPrediction(pointId, indicatorName, days) {
  return request({
    url: '/system/prediction/generate-air-quality',
    method: 'get',
    params: {
      pointId,
      indicatorName,
      days
    }
  })
}

// 生成水质预测数据
export function generateWaterQualityPrediction(pointId, indicatorName, days) {
  return request({
    url: '/system/prediction/generate-water-quality',
    method: 'get',
    params: {
      pointId,
      indicatorName,
      days
    }
  })
}

// 生成噪声预测数据
export function generateNoisePrediction(pointId, days) {
  return request({
    url: '/system/prediction/generate-noise',
    method: 'get',
    params: {
      pointId,
      days
    }
  })
}

// 获取预测趋势数据
export function getPredictionTrendData(predictionId) {
  return request({
    url: '/system/prediction/trend-data/' + predictionId,
    method: 'get'
  })
}

// 获取预测与实际对比数据
export function getPredictionComparisonData(predictionId) {
  return request({
    url: '/system/prediction/comparison-data/' + predictionId,
    method: 'get'
  })
}